﻿using UnityEngine;
using System.Collections;

public class Mover : MonoBehaviour {

    public float speed;

    //刚体组件
    private Rigidbody _rigidbody;

    void Awake()
    {
        _rigidbody = this.GetComponent<Rigidbody>();

        if (null == _rigidbody)
        {
            Debug.LogError("there is not Rigidbody!!");
        }

        _rigidbody.velocity = Vector3.forward * speed;
    }

}
